<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PrimitiveGenerator</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Spirit 2.59">
<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
<link rel="prev" href="generator.html" title="Generator">
<link rel="next" href="unarygenerator.html" title="UnaryGenerator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="generator.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unarygenerator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="spirit.karma.reference.generator_concepts.primitivegenerator"></a><a class="link" href="primitivegenerator.html" title="PrimitiveGenerator">PrimitiveGenerator</a>
</h5></div></div></div>
<h6>
<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h0"></a>
            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.description">Description</a>
          </h6>
<p>
            <span class="emphasis"><em>PrimitiveGenerator</em></span> is the most basic building block
            that the client uses to build more complex generators.
          </p>
<h6>
<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h1"></a>
            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of">Refinement
            of</a>
          </h6>
<div class="blockquote"><blockquote class="blockquote"><p>
              <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
            </p></blockquote></div>
<h6>
<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h2"></a>
            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit">Post-delimit</a>
          </h6>
<p>
            Before exiting the <code class="computeroutput"><span class="identifier">generate</span></code>
            member function, a PrimitiveGenerator is required to do a post-delimit.
            This will generate a single delimiting character/token sequence. Only
            PrimitiveGenerator's are required to perform this post-delimit. This
            is typically carried out through a call to <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span></code>:
          </p>
<pre class="programlisting"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">delimit</span><span class="special">);</span>
</pre>
<h6>
<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h3"></a>
            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions">Type
            Expressions</a>
          </h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                    <p>
                      Expression
                    </p>
                  </th>
<th>
                    <p>
                      Description
                    </p>
                  </th>
</tr></thead>
<tbody><tr>
<td>
                    <p>
                      <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_primitive_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
                    </p>
                  </td>
<td>
                    <p>
                      Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
                      if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>,
                      is a PrimitiveGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
                      otherwise (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
                      Boolean Constant</a>).
                    </p>
                  </td>
</tr></tbody>
</table></div>
<h6>
<a name="spirit.karma.reference.generator_concepts.primitivegenerator.h4"></a>
            <span class="phrase"><a name="spirit.karma.reference.generator_concepts.primitivegenerator.models"></a></span><a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.models">Models</a>
          </h6>
<p>
            The following generators conform to this model:
          </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
                <a class="link" href="../auxiliary/eol.html" title="End of Line Generator (eol)"><code class="computeroutput"><span class="identifier">eol</span></code></a>,
              </li>
<li class="listitem">
                <a class="link" href="../auxiliary/eps.html" title="Epsilon Generator (eps)"><code class="computeroutput"><span class="identifier">eps</span></code></a>,
              </li>
<li class="listitem">
                <a class="link" href="../numeric.html" title="Numeric Generators">Numeric generators</a>,
              </li>
<li class="listitem">
                <a class="link" href="../char/char_generator.html" title="Character Generators (char_, lit)">Character
                generators</a>.
              </li>
</ul></div>
<p>
            <span class="bold"><strong>FIXME</strong></span> Add more links to <span class="emphasis"><em>PrimitiveGenerator</em></span>
            models here.
          </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="generator.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unarygenerator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
